package com.workcell.workdata.im.model.vo;


import com.workcell.workdata.im.entity.User;
import io.swagger.annotations.ApiModelProperty;

public class UserVO {

    @ApiModelProperty("用户ID")
    private Long id;

    @ApiModelProperty("用户名称")
    private String name;

    @ApiModelProperty("备注名称")
    private String alias;

    @ApiModelProperty("手机号")
    private String telephone;

    @ApiModelProperty("组织ID")
    private Long organizationId;

    @ApiModelProperty("邮箱")
    private String email;

    private byte gender;

    @ApiModelProperty("格言信息")
    private String motto;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getTelephone() {
        return telephone;
    }

    public void setTelephone(String telephone) {
        this.telephone = telephone;
    }

    public Long getOrganizationId() {
        return organizationId;
    }

    public void setOrganizationId(Long organizationId) {
        this.organizationId = organizationId;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public byte getGender() {
        return gender;
    }

    public void setGender(byte gender) {
        this.gender = gender;
    }

    public String getMotto() {
        return motto;
    }

    public void setMotto(String motto) {
        this.motto = motto;
    }

    public String getAlias() {
        return alias;
    }

    public void setAlias(String alias) {
        this.alias = alias;
    }

    public static UserVO of(User user){
        UserVO vo = new UserVO();
        vo.setId(user.getId());
        vo.setName(user.getName());
        vo.setEmail(user.getEmail());
        vo.setTelephone(user.getTelephone());
        vo.setOrganizationId(user.getOrganizationId());
        vo.setGender(user.getGender());
        vo.setMotto(user.getMotto());
        return vo;
    }

    public static UserVO of(User user, String alias){
        UserVO vo = of(user);
        vo.setAlias(alias);
        return vo;
    }
}
